package walk;

import java.util.concurrent.atomic.AtomicInteger;

import org.jsoup.Connection;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;

import comm.LOG;

public class lu15 extends Thread {

	private static AtomicInteger ai = new AtomicInteger(94629);

	private static LOG log = new LOG("C:\\csuu\\15walk.offset");

	public void run() {

		while (true) {
			int i = ai.getAndDecrement();

			if (i % 100 == 0) {
				log.info(i);
			}

			String url = "http://www.15lu.com/u.php?uid="+i;
			try {
				Connection c = Jsoup.connect(url);

				c.userAgent("Mozilla/5.0 (Windows NT 6.2; WOW64; rv:18.0) Gecko/20100101 Firefox/18.0");
				c.header("Cookie", "01fa4_lastpos=other; 01fa4_ol_offset=14065; 01fa4_cloudClientUid=97525156; 01fa4_cloudcksessionid=37aeb9603de824331c0410dc2f1a84a8; 01fa4_pw_weibo_login=87311dcdc9eab2485a0628db5db54dfc; 01fa4_winduser=DgAPUQ1rUVQAUVNVAwBdDVNcA1JYAA8EUgBcUFJXUA8MU1ICAQYw; 01fa4_ck_info=%2F%09; 01fa4_lastvisit=419%091365583627%09%2Fu.php%3Fuid1; 01fa4_clearm_94644=2; spacemodeset=tab_model");

				c.referrer("http://http://www.15lu.com/");
				c.get();

				System.out.println(i);
				//sleep(300);

			} catch (Exception e) {
				System.out.println(e.getMessage());
			}
		}

	}

	public static void main(String[] args) {
		for (int i = 0; i < 1; i++) {
			new lu15().start();
		}
	}
}
